/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package negocio;

import datos.DbConnection;
import utils.ProgramaConfig;


/**
 *
 * @author Marcelo
 */
public class DataBase {
    //private DbConnection conexion = null;
    
    private static String server = "localhost";
    private static String name = "webetic";
    private static String username = "root";
    private static String password = "soloyose";
    
    public static DbConnection getNewConnection()
    {
        DbConnection conexion = new DbConnection();
        
        server = ProgramaConfig.read("server");
        name = ProgramaConfig.read("dbname");
        username = ProgramaConfig.read("user");
        password = ProgramaConfig.read("pass");
        
        conexion.connect(server, name, username, password);
        return conexion;        
    }
}
